package com.xiaozhen.alarm.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaozhen.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 配置告警信息
 *
 * @author zhenweisheng
 * @date 2021/10/13 21:06
 * @description:
 */
@Data
@TableName("alarm_config")
@ApiModel(description = "告警配置的表")
public class AlarmConfig extends BaseEntity {

    @TableId
    @ApiModelProperty(value = "配置的ID")
    private Long configId;

    @ApiModelProperty(value = "配置名称")
    private String configName;

    @ApiModelProperty(value = "要告警的表名")
    private String tableName;

    @ApiModelProperty(value = "要告警的字段")
    private String field;

    @ApiModelProperty(value = "告警的字段的单位")
    private String fieldUnit;

    @ApiModelProperty(value = "固定阈值:1 动态阈值:2")
    private String thresholdType;

    @ApiModelProperty(value = "运算符(大于 小于 等于 不等于)")
    private String symbols;

    @ApiModelProperty(value = "通知阈值数")
    private Double notifyThreshold;

    @ApiModelProperty(value = "警告阈值数")
    private Double warningThreshold;

    @ApiModelProperty(value = "紧急阈值数")
    private Double emergencyThreshold;

    @TableField(exist = false)
    @ApiModelProperty(value = "告警策略IDs")
    private List<Long> strategyIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "告警策略列表")
    private List<AlarmStrategy> alarmStrategyList;
}
